package gui;

import java.awt.Color;
import java.awt.Rectangle;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Dimension;
import javax.swing.JButton;
import javax.swing.JTextField;

public class MainEmployee extends JFrame{
	private JPanel mainform = null;
	private MainPanel MP;
	private JLabel jLabelWelcome = null;
	private JButton jButtonCatalog = null;
	private JButton jButtonOrder = null;
	private JButton jButtonExit = null;
	private JButton jButtonHelp = null;
	private JLabel jLabelLogIn = null;
	private JTextField jTextFieldloginInfo = null;
	private JLabel jLabelComplaints = null;
	private JTextField jTextFieldComplaintsNum = null;
	private JButton jButtonGoToComplaints = null;	
	
	public MainEmployee() {
		super();
		initialize();
	}

	/**
	 * 
	 */
	private void initialize() {
		this.setSize(1000, 720);
		this.setContentPane(MainEmployeeForm());
		this.setTitle("MAIN SCREEN");	
		
		
	}
	private JPanel MainEmployeeForm() {
		if (mainform == null) {
			jLabelComplaints = new JLabel();
			jLabelComplaints.setBounds(new Rectangle(165, 435, 166, 47));
			jLabelComplaints.setText("NUMBER OF COMPLAINTS:");
			jLabelLogIn = new JLabel();
			jLabelLogIn.setBounds(new Rectangle(285, 616, 168, 35));
			jLabelLogIn.setText("YOUR LAST LOGIN WAS ON:");
			jLabelWelcome = new JLabel();
			jLabelWelcome.setBounds(new Rectangle(165, 29, 556, 138));
			jLabelWelcome.setText("WELCOME TO ZER LEHA");
			mainform = new JPanel();
			mainform.setLayout(null);
			mainform.setBackground(Color.CYAN); 
			mainform.add(jLabelWelcome, null);
			mainform.add(getJButtonCatalog(), null);
			mainform.add(getJButtonOrder(), null);
			mainform.add(getJButtonExit(), null);
			mainform.add(getJButtonHelp(), null);
			mainform.add(jLabelLogIn, null);
			mainform.add(getJTextFieldloginInfo(), null);
			mainform.add(jLabelComplaints, null);
			mainform.add(getJTextFieldComplaintsNum(), null);
			mainform.add(getJButtonGoToComplaints(), null);
			 


		}
		return mainform; 
	}

	/**
	 * This method initializes jButtonCatalog	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonCatalog() {
		if (jButtonCatalog == null) {
			jButtonCatalog = new JButton();
			jButtonCatalog.setBounds(new Rectangle(315, 210, 318, 74));
			jButtonCatalog.setText("CATALOG OPTIONS");
			jButtonCatalog.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					
					EmployeeCatalogOP ECOPFrame = new EmployeeCatalogOP();
					ECOPFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
					ECOPFrame.setSize( 1000,720 ); // set frame size
					ECOPFrame.setResizable(true);
					ECOPFrame.setVisible( true ); // display frame
					MainEmployee.this.dispose();
				    
				    
				}
			});
		}
		return jButtonCatalog;
	}

	/**
	 * This method initializes jButtonOrder	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonOrder() {
		if (jButtonOrder == null) {
			jButtonOrder = new JButton();
			jButtonOrder.setBounds(new Rectangle(315, 316, 318, 74));
			jButtonOrder.setText("ENTER QUESTIONNAIRES");
		}
		return jButtonOrder;
	}

	/**
	 * This method initializes jButtonExit	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonExit() {
		if (jButtonExit == null) {
			jButtonExit = new JButton();
			jButtonExit.setBounds(new Rectangle(825, 616, 91, 47));
			jButtonExit.setText("EXIT");
			jButtonExit.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					
					ExitFrame EFrame = new ExitFrame();
				    EFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
				    EFrame.setSize( 300,200 ); // set frame size
				    EFrame.setResizable(true);
				    EFrame.setVisible( true ); // display frame
		
				    
				    
				}
			});
		}
		return jButtonExit;
	}

	/**
	 * This method initializes jButtonHelp	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonHelp() {
		if (jButtonHelp == null) {
			jButtonHelp = new JButton();
			jButtonHelp.setBounds(new Rectangle(61, 616, 90, 45));
			jButtonHelp.setText("HELP");
		}
		return jButtonHelp;
	}

	/**
	 * This method initializes jTextFieldloginInfo	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldloginInfo() {
		if (jTextFieldloginInfo == null) {
			jTextFieldloginInfo = new JTextField();
			jTextFieldloginInfo.setBounds(new Rectangle(465, 616, 137, 35));
		}
		return jTextFieldloginInfo;
	}

	/**
	 * This method initializes jTextFieldComplaintsNum	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldComplaintsNum() {
		if (jTextFieldComplaintsNum == null) {
			jTextFieldComplaintsNum = new JTextField();
			jTextFieldComplaintsNum.setBounds(new Rectangle(345, 436, 241, 45));
		}
		return jTextFieldComplaintsNum;
	}

	/**
	 * This method initializes jButtonGoToComplaints	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonGoToComplaints() {
		if (jButtonGoToComplaints == null) {
			jButtonGoToComplaints = new JButton();
			jButtonGoToComplaints.setBounds(new Rectangle(600, 436, 120, 44));
			jButtonGoToComplaints.setText("WATCH");
		}
		return jButtonGoToComplaints;
	}
	
}  //  @jve:decl-index=0:visual-constraint="26,28"
